const Rx = require('rxjs')
var observable1 = Rx.interval(2e3);
var observable2 = Rx.interval(3e3);

var subscription = observable1.subscribe(x => console.log('first: ' + x, performance.now()));
var childSubscription = observable2.subscribe(x => console.log('second: ' + x, performance.now()));

subscription.add(childSubscription)

setTimeout(() => {
	subscription.unsubscribe()
}, 1e4);